package com.fzh.wangxiao.web.dispatch.controller;


import com.fzh.wangxiao.utils.Result;
import com.fzh.wangxiao.web.dispatch.service.TBizDispatchService;
import com.fzh.wangxiao.web.req.DispatchListRequest;
import com.fzh.wangxiao.web.req.DispatchRequest;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author fang
 * @since 2021-01-05
 */
@RestController
@RequestMapping("/web/dispatch")
public class TBizDispatchController {


    @Autowired
    private TBizDispatchService tBizDispatchService;


    @PostMapping("/list")
    @ApiOperation(value = "我的客户列表  √")
    public Result list(@Valid @RequestBody DispatchListRequest request) {
        return tBizDispatchService.list(request);
    }



    @PostMapping("/update")
    @ApiOperation(value = "修改进度  √")
    public Result update(@Valid @RequestBody DispatchRequest request) {
        return tBizDispatchService.update(request);
    }


}

